package cn.hss.thread;

/**
 * @author 作者：HeShaoShuai
 * @Email 邮箱：2569819541@qq.com
 * @Date 日期：2023/4/28 10:13
 * @Package 包名：cn.hss.thread
 * @Project 项目名：JavaSE
 * @Version 1.0
 */
public class RunnableTest {
	public static void main(String[] args) {
		//创建自定义线程对象
		MyRunnable mr = new MyRunnable();
		//创建mr1自定义线程对象
		MyRunnable mr1 = new MyRunnable();
		//启动线程
		Thread t =new Thread(mr,"长江");
		t.start();
		//启动线程mr1
		Thread t1 =new Thread(mr1,"鸭绿江");
		t1.start();
		//for循环执行main线程
		for(int i=0;i<5;i++){
			System.out.println("main线程"+i);
		}
	}
}
